import type { LoginCodeData } from "@/types/user"
import { defineStore } from "pinia"
import { ref } from "vue"

export const useUserStore = defineStore('user', () => {
  const user = ref<LoginCodeData>({} as LoginCodeData)
  const setUser = (u: LoginCodeData)=>{
    user.value = u
  }
  return { user, setUser }
}, {
  // @ts-ignore
  unistorage: true
})